/**
 * Copyright (c) 2010 - 2018 Allinpay. All rights reserved.
 */
package com.allinpay.springBoot.springboot.dao.pojo;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.Data;

/**
 * TODO:
 *
 * @author tangjun
 * @date 2018-08-11
 */
@Data
@Entity
@Table(name = "T_HD_ORDER_INFO")
@JsonIgnoreProperties({ "hibernateLazyInitializer", "handler" })
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.allinpay.common.rule.entity.RuleName")
public class HdOrderInfo implements Serializable {

	private static final long serialVersionUID = 1L;

	/** 订单ID **/
	@Id
	@Column(name = "ORDER_ID")
	private String orderId;

	/** 营业执照号 **/
	@Column(name = "BIZ_LIC_NO")
	private String bizLicNo;

	/** 企业名称 **/
	@Column(name = "CORP_COM_REG_NAME")
	private String corpComRegName;

	/** 上传福利文件名 **/
	@Column(name = "ORDER_FILE_NAME")
	private String orderFileName;

	/** 发放总金额 **/
	@Column(name = "TOTAL_AMT")
	private BigDecimal totalAmt;

	/** 发放总笔数 **/
	@Column(name = "TOTAL_COUNT")
	private Integer totalCount;

	/** 是否需要人工 **/
	@Column(name = "IS_NEED_MANUAL")
	private String isNeedManual;

	/**
	 * 00：初始； 01：支付处理中； 02：待上传明细；<br>
	 * 03：待确认； 04：确认处理中； 05：待发放； <br>
	 * 06：发放处理中； 07：已退款； 08：退款处理中；<br>
	 * 09：待开票； 10：已完成； 99：已关闭 <br>
	 **/
	@Column(name = "ORDER_STATUS")
	private String orderStatus;

	/** 开票费率 **/
	@Column(name = "ORDER_FEE")
	private BigDecimal orderFee;

	/** 客户经理号 **/
	@Column(name = "ORDER_PM_HP")
	private String orderPmHp;

	/** 服务费 **/
	@Column(name = "ORDER_REVN")
	private BigDecimal orderRevn;

	/** 订单总金额（发放金额加上开票费） **/
	@Column(name = "ORDER_AMT")
	private BigDecimal orderAmt;

	/** 支付银行代码 **/
	@Column(name = "PAY_BANK_CODE")
	private String payBankCode;

	/** 支付银行名称 **/
	@Column(name = "PAY_BANK_NAME")
	private String payBankName;

	/** 付款账号 **/
	@Column(name = "PAY_ACCT_NO")
	private String payAcctNo;

	/** 付款账户名 **/
	@Column(name = "PAY_ACCT_NAME")
	private String payAcctName;

	/** 来款金额 **/
	@Column(name = "PAY_ACCT_AMT")
	private BigDecimal payAcctAmt;

	/** 客户经理登录名 **/
	@Column(name = "CUST_PM_LOGIN_NAME")
	private String custPmLoginName;

	/** 客户经理手机号码 **/
	@Column(name = "CUST_PM_MOBILE")
	private String custPmMobile;

	/** 客户经理所属机构 **/
	@Column(name = "BRH_ID")
	private String brhId;

	/** 是否需要发票0:需要 1:不需要 **/
	@Column(name = "IS_NEED_INVC")
	private String isNeedInvc;

	/** 开票绩效费率 **/
	@Column(name = "BILL_ACHIEVE_RATE")
	private BigDecimal billAchieveRate;

	/** 是否特殊处理 0：正常处理 1：特殊审批 **/
	@Column(name = "IS_SPECIAL")
	private String isSpecial;

	/** 总部保本费率 **/
	@Column(name = "HEAD_FEE_RATE")
	private String headFeeRate;

	/** 分公司分成费率 **/
	@Column(name = "BRH_FEE_RATE")
	private String brhFeeRate;

	/** 税号 **/
	@Column(name = "TAX_NO")
	private String taxNo;

	/** 电商支付单号 **/
	@Column(name = "PAY_NO")
	private String payNo;

	/** 云订单号 **/
	@Column(name = "BIZ_ORDER_NO")
	private String bizOrderNo;

	/** 创建时间 **/
	@Column(name = "CREATE_TIME")
	private String createTime;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "hdOrderInfo")
	private List<HdOrderTransInfo> listHdOrderTransInfo = new ArrayList<HdOrderTransInfo>();
	
}
